<?php
$this->widget('zii.widgets.CMenu', array(
	'items'=>array(
//		array(
//			'label'=>'发布文章',
//			'url'=>array('/post/create'),
//			'visible'=>Yii::app()->user->checkAccess('Post.Create')
//		),
    /*
		array(
			'label'=>'查看文章',
			'url'=>array('/post/admin'), 
			'visible'=>Yii::app()->user->checkAccess('Post.Update')
		),
        array(
            'label'=>'查看图片',
            'url'=>array('/imgs/admin'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.Update')
        ),
        array(
            'label'=>'查看坐标',
            'url'=>array('/place/admin'),
            'visible'=>Yii::app()->user->checkAccess('Place.Update')
        ),
    */
        array(
            'label'=>'显示轨迹',
            'url'=>array('/imgs/get_google_code'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.Get_google_code')
        ),

        array(
            'label'=>'查看文章',
            'url'=>array('/imgs/list_post'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.List_post')
        ),
        array(
            'label'=>'查看图片',
            'url'=>array('/imgs/list_imgs'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.List_imgs')
        ),
        array(
            'label'=>'查看坐标',
            'url'=>array('/imgs/list_place'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.List_place')
        ),

        array(
            'label'=>'发布[图片，文字，坐标]',
            'url'=>array('/imgs/create'),
            'visible'=>Yii::app()->user->checkAccess('Imgs.Create')
        ),
//        array(
//            'label'=>'发布坐标',
//            'url'=>array('/place/create'),
//            'visible'=>Yii::app()->user->checkAccess('Place.Create')
//        ),

        array(
            'label'=>'发布日志',
            'url'=>array('/logs/create'),
            'visible'=>Yii::app()->user->checkAccess('Logs.Create')
        ),
        array(
            'label'=>'查看日志',
            'url'=>array('/logs/admin'),
            'visible'=>Yii::app()->user->checkAccess('Logs.Admin')
        ),

        array(
            'label'=>'发布店铺',
            'url'=>array('/shop/create'),
            'visible'=>Yii::app()->user->checkAccess('Shop.Create')
        ),
        array(
            'label'=>'查看店铺',
            'url'=>array('/shop/admin'),
            'visible'=>Yii::app()->user->checkAccess('Shop.Admin')
        ),

        array(
            'label'=>'查看用户',
            'url'=>array('/user/admin'),
            'visible'=>Yii::app()->user->checkAccess('User.Admin')
        ),
        array(
            'label'=>'创建用户',
            'url'=>array('/user/admin/create'),
            'visible'=>Yii::app()->user->checkAccess('User.Admin')
        ),
        array(
            'label'=>'群组管理',
            'url'=>array('/group/admin'),
            'visible'=>Yii::app()->user->checkAccess('Group.Admin')
        ),
        array(
            'label'=>'图片分类',
            'url'=>array('/menu/admin'),
            'visible'=>Yii::app()->user->checkAccess('Group.Admin')
        ),
//		array(
//			'label'=>Yii::t('blog', 'Approve Comments (:commentCount)', array(':commentCount'=>Comment::model()->pendingCommentCount)),
//			'url'=>array('/comment/index'), 'visible'=>Yii::app()->user->checkAccess('Comment.Approve')
//		),
		array(
			'label'=>'退出',
			'url'=>array('/site/logout'), 
			'visible'=>!Yii::app()->user->isGuest
		),
	),
));